<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加用户信息</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path}/wxuser/save.json" method="post">
<div class="form">
	<div class="title">添加用户信息</div>
	<div class="group">
		<div class="label">*登录账号:</div>
		<div class="item"><input type="text" name="loginName" id="loginName" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">*密码:</div>
		<div class="item"><input type="password" name="passwd" id="passwd" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">*确认密码:</div>
		<div class="item"><input type="password" name="repasswd" id="repasswd" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">*姓名:</div>
		<div class="item"><input type="text" name="username" id="username" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">*昵称:</div>
		<div class="item"><input type="text" name="nickname" id="nickname" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">*手机号码:</div>
		<div class="item"><input type="text" name="phone" id="phone" maxlength="20" /></div>
	</div>
	<div class="group">
		<div class="label">地区:</div>
		<div class="item"><input type="text" id="regionname" /><input type="hidden" name="regionid" id="regionid" /></div>
		<div class="item" id="regionnameTip"></div>
	</div>
	<div class="group">
		<div class="label">地址:</div>
		<div class="item"><input type="text" name="address" id="address" maxlength="200" /></div>
	</div>
	<div class="group">
		<div class="label">性别:</div>
		<div class="item">
			<input type="radio" id="sex1" name="sex" value="男" checked="checked" /><label for="sex1" class="label">男</label>
			<input type="radio" id="sex2" name="sex" value="女" /><label for="sex2" class="label">女</label>
		</div>
	</div>
	<div class="group">
		<div class="label">出生日期:</div>
		<div class="item"><input type="text" name="birth" id="birth" ltype="date" /></div>
		<div class="item" id="birthTip"></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
	</div>
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript">
$(function() {
	createRegionSelect('regionname', 'regionid', {
		extendTop: true,
		selectBoxWidth: 350,
		tree:{
			url:'${path}/region/selectTree.json',
			initParamString:'getself=true'
		}
	});
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "添加用户信息成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
	
});
</script>
</body>
</html>